#!/bin/sh

# Automatically exit if any command returns error
set -e

if [ "$1" = "configure" ]; then
    
    # Menu entries
    if [ -x "`which update-menus 2> /dev/null`" ]; then
	update-menus
    fi

    # Icons
    touch -c /usr/share/icons/hicolor
    if [ -x "`which update-icon-caches 2> /dev/null`" ]; then
	update-icon-caches -tq /usr/share/icons/hicolor
    elif [ -x "`which gtk-update-icon-cache 2> /dev/null`" ]; then
	gtk-update-icon-cache -tq /usr/share/icons/hicolor
    fi

fi

exit 0
